Callback query and inline keyboards support#83
Callback query and inline keyboards support#83MarcoBuster wants to merge 3 commits intopython-botogram:masterfrom
Conversation
| botogram.objects.callback_query | ||
| Representation of the callback query-related upstream API objects | ||
|
|
||
| Copyright (c) 2015 Pietro Albini <pietro@pietroalbini.io> |
There was a problem hiding this comment.
That should be you, not me, and we're not in 2015.
There was a problem hiding this comment.
I did nothing on that file: the copyright notice should be of the single file, not of the whole project, and you're the author of that file :)
botogram/objects/updates.py
Outdated
| "channel_post": Message, | ||
| "edited_channel_post": Message | ||
| "edited_channel_post": Message, | ||
| "callback_query": CallbackQuery |
There was a problem hiding this comment.
Add a trailing comma here so you don't need to change two lines the next time you want to add a value :)
docs/api/telegram.rst
Outdated
| This class represents a callback query object. | ||
| .. py:attribute:: id | ||
|
|
||
| Unique identifier for the query |
docs/api/telegram.rst
Outdated
|
|
||
| .. py:attribute:: sender | ||
|
|
||
| The :py:class:`~botogram.User` that sends the callback query |
docs/api/telegram.rst
Outdated
|
|
||
| .. py:attribute:: message | ||
|
|
||
| :py:class:`~botogram.Message` with the callback button that originated the query. |
There was a problem hiding this comment.
Don't add dots at the end only in some snippets, add them everywhere or nowhere.
19c48d8 to
f5c655a
Compare
emilyalbini
left a comment
There was a problem hiding this comment.
Also, the documentation for @bot.callback and Component.add_callback_hook is missing.
| .. py:class:: botogram.CallbackQuery | ||
|
|
||
| This class represents a callback query received by the bot. | ||
|
|
There was a problem hiding this comment.
You forgot the version this is added to.
| hook = hooks.EditedChannelPostHook(func, self) | ||
| self.__channel_post_edited_hooks.append(hook) | ||
|
|
||
| def add_callback_query_hook(self, func): |
There was a problem hiding this comment.
Maybe rename this to add_callback_hook to be consistent with @bot.callback?
|
I'm implementing a more advanced version of this by myself. Thanks for sending the pull request though! |
I'm adding callback query and inline keyboards support, according to #66.